package com.example.petproject.controller;

import com.example.petproject.entity.vo.CategoryListVO;
import com.example.petproject.entity.vo.ReturnVO;
import com.example.petproject.service.PmsProductCategoryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 包名称：com.example.petproject.controller
 * 类名称：CategoryController
 * 类描述：商品类别控制器
 * 创建人：@author DrinkMore-HotWater
 * 创建时间：2024年01月05日 10:33
 **/
@RestController
@RequestMapping("pms/product/category/")
@Tag(name = "商品分类列表")
public class PmsProductCategoryController {

    @Resource
    private PmsProductCategoryService categoryService;

    @GetMapping("/list")
    @Operation(summary  = "获取所有分类列表")
    public ReturnVO<List<CategoryListVO>> getCategoryList(){
        return ReturnVO.ok(categoryService.getCategoryList());
    }

}
